package com.lxq.scmserver.controller;

import com.lxq.scmserver.entity.BookingDetails;
import com.lxq.scmserver.service.FlightBookingService;
import java.util.List;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: LuoXiaoQiang
 * @date: 5/10/2025 9:12 AM
 * Copyright (c) 2025, LXQ Cloud All Rights Reserved.
 */
@RestController
@CrossOrigin
public class BookingController {

    private final FlightBookingService flightBookingService;

    public BookingController(FlightBookingService flightBookingService) {
        this.flightBookingService = flightBookingService;
    }
    @CrossOrigin
    @GetMapping(value = "/booking/list")
    public List<BookingDetails> getBookings() {
        return flightBookingService.getBookings();
    }

}